box: Remove some unneeded checks
authorTimm Bäder <mail@baedert.org>
Tue, 16 Jan 2018 17:47:52 +0000 (18:47 +0100)
committerTimm Bäder <mail@baedert.org>
Wed, 17 Jan 2018 20:57:19 +0000 (21:57 +0100)
We only call this function from the measure implementation and we should
never get NULL pointers there.

gtk/gtkbox.c

index eafc62a3a36e93913f68d3d33962dc43561ba843..21f388158346d306a30b374154095aaa23d1fc1a 100644 (file)
@@ -1223,15 +1223,11 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
        }
     }
 
-  if (minimum_baseline)
-    *minimum_baseline = computed_minimum_baseline;
-  if (natural_baseline)
-    *natural_baseline = computed_natural_baseline;
-
-  if (minimum_size)
     *minimum_size = computed_minimum;
-  if (natural_size)
     *natural_size = MAX (computed_natural, computed_natural_below + computed_natural_above);
+
+    *minimum_baseline = computed_minimum_baseline;
+    *natural_baseline = computed_natural_baseline;
 }
 
 static void